
* Do file codes for
* Using citizen voice to evaluate experiments on politicians: a UK survey experiment

************************************************************************************************** 														
* Peter John (King's College)
* Kristina Kim (University of Edimburgh)		
* Luis Soto (King's College)											
**************************************************************************************************

clear *
set more off

	* call in 'Deltapoll Survey' dataset
	use "Deltapoll_PeterJohn220114-final2.dta", clear 	

	* install packages
ssc install outreg2
ssc install asdoc
net install asdoc, from(http://fintechprofessor.com) replace
ssc install estout


****************************************************************	
** Manipulate dataset and create variables for the main analysis

* ID variables for different scenarios

	* deception: Scenarios A1 A2 A3 & C 
gen deception_A = Scenario
recode deception_A 1=1 2=1 3=1 else=0

gen deception_AC = Scenario
recode deception_AC 1=1 2=1 3=1 6=1 else=0

	* debriefing: Scenarios A2 A3 & B2
gen debriefing = Scenario
recode debriefing 2=1 3=1 5=1 else=0

	* confederates: Scenarios B1 & B2
gen confederates = Scenario
recode confederates 4=1 5=1 else=0

	* pre-agreement: Scenario C
gen preagree = Scenario
recode preagree 6=1 else=0

	* MPs complain: Scenario A3
gen complain = Scenario
recode complain 3=1 else=0

	* journalists: Scenario D
gen journalist= Scenario
recode journalist 7=1 else=0

	*one dummy for each scenario
tab Scenario, gen(scen_dum_)
global scen_dummies = "scen_dum_1 scen_dum_2 scen_dum_3 scen_dum_4 scen_dum_5 scen_dum_6 scen_dum_7"

* OUTCOME VARIABLES - PJ3_1 (acceptance), PJ4 (feelings) & PJ9_1 (worthwhile)

	* Check missing values and "Don't know" (DK) category
tab1 PJ3_1 PJ4 PJ9, m //Low percentage of missing values or DK responses, so not treated as meaningful categories.

	*acceptability
recode PJ3_1 999=. //DK responses are treated as missing data and excluded from analysis.
gen PJ3_1_dmmy = PJ3_1 // dummy 1 (above 4), 0 otherwise
	recode PJ3_1_dmmy 1=0 2=0 3=0 4=0 5=1 6=1 7=1
	label define PJ3_1_dmmy 1 "Agree" 0 "Disagree"

	*feelings
clonevar PJ4b =PJ4 //PJ4b preserves the DK category (for Table 2)
recode PJ4 4=. 
gen PJ4_dmmy=PJ4 // dummy 1 (glad my MP was in the study), 0 otherwise
recode PJ4_dmmy 1=1 .=. else=0

	*worthwhile
recode PJ9_1 999=.

* COVARIATES

	*gender
recode Gender 1=0 2=1 else =.  // Following original code in which Male=0 Female=1
	label drop Gender
	label define Gender 0 "Male" 1 "Female" 
	
	*age 
gen age2=Age^2
	
	*political interest	
recode PJ1 5=. 
	rename PJ1 pol_int
	gen pol_int_dmmy = pol_int //dummy 1 (Very/Fairly interested) 0 (Not very/at all interested).
	recode pol_int_dmmy 2=1 3=0 4=0
	label define pol_int_dmmy 1 "Interested" 0 "Not interested"
	
	*white
recode PJx1 1=1 2=1 else=0
	label drop PJx1
	label define PJx1 1 "white" 0 "other no white"
	rename PJx1 white

	*degree
recode PJx2 16=1 17=1 19=. 20=. else=0
	label drop PJx2
	label define PJx2 0 "no degree" 1 "degree"
	rename PJx2 degree

	*religious
recode PJx4a 2=1 1=0 else=. 
	label drop PJx4a
	label define PJx4a 0 "no" 1 "yes"
	rename PJx4a religious

	*conservative vote
gen cons_vote_21 = VoteIntFull
recode cons_vote_21 1=1 else=0
	label define cons_vote_21 1 "consevartive vote" 0 "other parties"
	
	*income
recode PJx3 16=. 17=.
	rename PJx3 income

	*efficacy 
global efficacy = "PJ2_1 PJ2_2 PJ2_3 PJ2_4 PJ2_5 PJ2_6"
foreach j in $efficacy {
	 recode `j' 6=.
	}	
pca $efficacy //Principal Component Analysis
predict pc1, score
estat kmo 
mean pc1, over(Scenario)
rename pc1 efficacy

	**manipulation checks
	
	*check confederates
	gen check_conf =0
	replace check_conf=1 if PJ6_3==1 & confederates==1
	
	*check deception
	gen check_des =0
	replace check_des=1 if PJ6_1==1 & deception_AC==1
	gen manipulation = check_conf+check_des
	
	*check journalists
	gen check_journalist =0
	replace check_journalist=1 if PJ6_6==1 & journalist==1
	
	*check debriefing
	gen check_debr =0
	replace check_debr=1 if PJ6_2==1 & debriefing==1
	
	*check preagree
	gen check_preag =0
	replace check_preag=1 if PJ6_4 ==1 & preagree==1
	
	*check complain
	gen check_comp =0
	replace check_comp=1 if PJ6_5==1 & complain==1
	gen check_all = check_conf + check_des + check_journalist + check_debr + check_preag + check_comp
	replace check_all=1 if check_all>=1 

	* vars for Figure 1

	* Calculate the mean of Acceptance for each scenario
	bysort Scenario: egen mean_aprob=mean(PJ3_1) if PJ3_1<=7
 
	*Count the number of observations by Scenario
	egen N_ = count(PJ3_1), by (Scenario)

	*Calculate SD, SE min and max
	bysort Scenario: egen sd_aprob=sd(PJ3_1) if PJ3_1<=7
	gen sd_min = mean_aprob - sd_aprob
	gen sd_max = mean_aprob + sd_aprob

	*Calculate confidence intervals with SE
	gen hi_aprob = mean_aprob + invttail(N_-1,0.025)*(sd_aprob / sqrt(N_))
	gen low_aprob = mean_aprob - invttail(N_-1,0.025)*(sd_aprob / sqrt(N_))

	*Calculate mean for all observations in aprob regardless their category
	egen mean_aprob_all=mean(PJ3_1) if PJ3_1<=7
	scalar mean_all = mean_aprob_all
	display mean_all

	*Relabel var Scenario for cleaner presentation in the graph
	label drop Scenario
	label define Scenario 1 "A1" 2 "A2" 3 "A3" 4 "B1" 5 "B2" 6 "C" 7 "D" 999 "DK"

*****************************************	
** Main paper
*****************************************


*Figure 1: Citizen views of the acceptability (Mean and SE by scenario)
twoway (bar mean_aprob Scenario, base(1) barw(0.7) fcolor(gray) lcolor(none) ) ///
	   (rcap hi_aprob low_aprob Scenario, lcolor(black)  lwidth(vthin)) ///
	   (function y = `=mean_all',ra(0.5 7.5)  lcolor(black) lwidth(vthin) lpattern(dash)) ///
	   (pcarrowi 5.48 7.3 5.48 7.3 (12) "Mean = 5.48", mlabsize(vsmall) mlabcolor(black) msize(vsmall) mcolor(white)), ///
	   ylabel(1(1)7, labsize(small) grid angle(horizontal)) yscale(range(1 7) titlegap(1)) ///
	   xtitle("Scenario", color(black) alignment(bottom))  xlabel(1(1)7, labsize(small) angle(0) valuelabels labgap(2)) xscale(titlegap(3)) ///
	   graphregion(fcolor(white)) scheme(lean2) caption(To what extent do you agree that it is acceptable to carry out this study?, position(12)) note((1 = Strongly disagree; 7 Strongly agree), position(12)) legend(off) graphregion (color(white)) plotregion(margin(none))
	   
graph save "Graph" "$figures/Figure 1.gph", replace 
graph export "$figures/Figure 1.png", replace as(png) name("Graph")
 

* Table 2

asdoc tab PJ4b Scenario, col dec(1) save(table 2.oct.doc) title(Table 2: Views about participationpf respondent's MP in the study of scenarios) replace

*Figure 2a: Impact of Political Interest on Approval of Deception

global covar_views = "Gender Age age2 degree religious white deception_AC"

probit PJ4_dmmy $covar_views i.SocGrade i.deception_AC##i.pol_int [pweight=w8], robust 
est sto Weights
margins pol_int#deception_AC
marginsplot, title("Predictions Deception vs other (95% CIs)",  color(black) size(4)) ///
    recast(connected) recastci(rarea) ciopt(color(gs14%40)) ///
	ytitle("Pr(Accept MPs in studies=1)", alignment(top) size(3))  ylabel(0(.25)1, labsize(small)) ///
	xtitle("Interest in politics", alignment(baseline) size(3)) graphregion(color(white)) ///
	xlabel( 1 "Very" 2 "Fairly" 3 "Not very" 4 "Not at all", labsize(vsmall)) ///
	plotregion(lcolor(white))  ///
	plot2opts(lcolor(black) mlabcolor(black) mcolor(black)) ///
	plot1opts(lcolor(gs6) lpattern("--") mlabcolor(black) mcolor(black)) 
graph save "Graph" "$figures/Figure2a.gph", replace 
graph export "$figures/Figure2a.png", replace as(png) name("Graph")	

* Figure 2b: predicting support for placing MPs (journalists scenario=D) 
global covar_D = "Gender Age age2 degree religious white cons_vote_21"
	
probit PJ3_1_dmmy $covar_D i.SocGrade i.journalist##i.pol_int [pweight=w8], robust 
margins pol_int#journalist
marginsplot, title("Predictions Jornalist vs other (95% CIs)",  color(black) size(4)) ///
    recast(connected) recastci(rarea) ciopt(color(gs14%60)) ///
	ytitle("Pr(Agree MPs in studies=1)", alignment(top) size(3))  ylabel(0(.25)1, labsize(small)) ///
	xtitle("Interest in politics", alignment(baseline) size(3)) graphregion(color(white)) ///
	xlabel( 1 "Very" 2 "Fairly" 3 "Not very" 4 "Not at all", labsize(vsmall)) ///
	plotregion(lcolor(white))  ///
	plot2opts(lcolor(black) mlabcolor(black) mcolor(black)) ///
	plot1opts(lcolor(gs6) lpattern("--") mlabcolor(black) mcolor(black)) 
	
graph save "Graph" "$figures/Figure2b.gph", replace 
graph export "$figures/Figure2b.png", replace as(png) name("Graph")	

graph combine Figure2a.gph Figure2b.gph, colfirst
graph save "Graph" "$figures/Figure2ab.gph", replace 

*****************************************	
** Appendix
*****************************************

*Appendix H: Weighted Tables 

	*Table H1: Comparing Results in Figure 1
mean PJ3_1, over(Scenario)  // no weighted
outreg2 using app_H_tableH1.doc, label dec(2) replace ctitle(No weighted) noaster 
mean PJ3_1 [pw=w8], over(Scenario)  // weighted
outreg2 using app_H_tableH1.doc, label dec(2) append ctitle(Weighted) noaster 

	*Table H2: Views of MPs Participation in Studies with Identity Deception or Use of Confederates, probit models, with weights
probit PJ4_dmmy $covar_views i.SocGrade i.deception_AC##i.pol_int, robust 
est sto NoWeights

esttab NoWeights Weights  ///
		using "$figures/app_H_Table H2.rtf", replace se b(3) star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack modelwidth(10) varwidth(18) label nobaselevels ///
		coef ( Gender "Female" /// 
		       Age "Age" /// 
		       white   "White" /// 
		       degree "Degree" /// 
			   cons_vote_21 "Conservative vote" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
			   pol_int "Political interest" ///
		       deception_AC "Scenarios with deception"  ) 	///
			   order (Gender Age white degree religious deception_AC manipulation SocGrade pol_int)
eststo clear 

	**Figure H1: Replication of Figure 2: Weights vs No Weights
	*Figure 2a (No Weights): Impact of political interest on approval of deception

probit PJ4_dmmy $covar_views i.SocGrade i.deception_AC##i.pol_int, robust 
est sto NoWeights
margins pol_int#deception_AC
marginsplot, title("Predictions Deception vs other (95% CIs)",  color(black) size(4)) ///
    recast(connected) recastci(rarea) ciopt(color(gs14%40)) ///
	ytitle("Pr(Accept MPs in studies=1)", alignment(top) size(3))  ylabel(0(.25)1, labsize(small)) ///
	xtitle("Interest in politics", alignment(baseline) size(3)) graphregion(color(white)) ///
	xlabel( 1 "Very" 2 "Fairly" 3 "Not very" 4 "Not at all", labsize(vsmall)) ///
	plotregion(lcolor(white))  ///
	plot2opts(lcolor(black) mlabcolor(black) mcolor(black)) ///
	plot1opts(lcolor(gs6) lpattern("--") mlabcolor(black) mcolor(black)) 	
graph save "Graph" "$figures/Figure2c.gph", replace 
graph export "$figures/Figure2c.png", replace as(png) name("Graph")	

	
	* Figure 2b (No weights): predicting support for placing MPs (journalists scenario=D) 

probit PJ3_1_dmmy $covar_D i.SocGrade i.journalist##i.pol_int, robust 
margins pol_int#journalist
marginsplot, title("Predictions Jornalist vs other (95% CIs)",  color(black) size(4)) ///
    recast(connected) recastci(rarea) ciopt(color(gs14%60)) ///
	ytitle("Pr(Agree MPs in studies=1)", alignment(top) size(3))  ylabel(0(.25)1, labsize(small)) ///
	xtitle("Interest in politics", alignment(baseline) size(3)) graphregion(color(white)) ///
	xlabel( 1 "Very" 2 "Fairly" 3 "Not very" 4 "Not at all", labsize(vsmall)) ///
	plotregion(lcolor(white))  ///
	plot2opts(lcolor(black) mlabcolor(black) mcolor(black)) ///
	plot1opts(lcolor(gs6) lpattern("--") mlabcolor(black) mcolor(black)) 
	
graph save "Graph" "$figures/Figure2d.gph", replace 
graph export "$figures/Figure2d.png", replace as(png) name("Graph")	

graph combine Figure2c.gph Figure2d.gph, colfirst
graph save "Graph" "$figures/Figure2cd.gph", replace 

graph combine Figure2ab.gph Figure2cd.gph, col(1)

*Appendix I: Balance Tests (probit models)

global cov_balance = "Gender Age age2 white degree religious "

		* Model 1 - A1
		quietly probit  scen_dum_1  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m1_
		
		* Model 2 - A2 
		quietly probit  scen_dum_2  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m2_
		
		* Model 3 - A3
		quietly probit  scen_dum_3  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m3_
		
		* Model 4 - B1
		quietly probit  scen_dum_4  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m4_
		
		* Model 5 - B2
		quietly probit  scen_dum_5  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m5_
		
		* Model 6 - C
		quietly probit  scen_dum_6  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m6_
		
		* Model 7 - D
		quietly probit  scen_dum_7  $cov_balance i.Region i.SocGrade i.VoteIntFull [pweight=w8], robust 
		est sto m7_

		* Export results
				
		esttab m1_ m2_ m3_ m4_ m5_ m6_ m7_   ///
		using "$figures/app_I.rtf", replace se b(3) star(* 0.1 ** 0.05 *** 0.01) ///
		coef ( Gender "Female" /// 
		       Age "Age" /// 
		       white   "White" /// 
		       degree "Degree" /// 
		       religious "Religious" /// 
			   order ($cov_balance Region ) ///
		nocons eqlabels(none) unstack modelwidth(10) varwidth(18) label nobaselevels )
		eststo clear 

*Appendix J: Manipulation Check

	*Table J1: Respondent Attributions of the Scenarios
	asdoc tab PJ6_1 deception_AC, col save(app_J_table J1.doc) replace
	asdoc tab PJ6_2 debriefing, col save(app_G_table AG1.doc) rowappend
	asdoc tab PJ6_3 confederates, col save(app_G_table AG1.doc) rowappend
	asdoc tab PJ6_4 preagree, col save(app_G_table AG1.doc) rowappend
	asdoc tab PJ6_5 complain, col save(app_G_table AG1.doc) rowappend
	asdoc tab PJ6_6 journalist, col save(app_G_table AG1.doc) rowappend
	

*Appendix L: T-Tests Between the Scenarios

	*Table L1: Acceptability Scenario Against the Rest 

	reg PJ3_1 ibn.Scenario, noconstant // We specify ibn.Scenario so there will be no base category

foreach s in PJ3_1 {
	 estpost ttest `s', by (scen_dum_1) 
	 est sto scen_dum_1
	 
	 estpost ttest `s', by (scen_dum_2) 
	 est sto scen_dum_2
	 
	 estpost ttest `s', by (scen_dum_3) 
	 est sto scen_dum_3
	 
	 estpost ttest `s', by (scen_dum_4) 
	 est sto scen_dum_4
	 
	 estpost ttest `s', by (scen_dum_5) 
	 est sto scen_dum_5
	 
	 estpost ttest `s', by (scen_dum_6) 
	 est sto scen_dum_6
	 
	 estpost ttest `s', by (scen_dum_7) 
	 est sto scen_dum_7
	 
	 esttab scen_dum_1 scen_dum_2 scen_dum_3 scen_dum_4 scen_dum_5 scen_dum_6 scen_dum_7 using "$figures/app_L_TableL1.rtf",  replace onecell nonumber label mtitle("diff.")
	 
	}
	
	*Table L2: Acceptability Scenarios One-by-One 
		
	*A1vsA2
	gen a1a2 =.
	replace a1a2=1 if scen_dum_1
	replace a1a2=0 if scen_dum_2
	*A1vsA3
	gen a1a3 =.
	replace a1a3=1 if scen_dum_1
	replace a1a3=0 if scen_dum_3
	*A1vsB1
	gen a1b1 =.
	replace a1b1=1 if scen_dum_1
	replace a1b1=0 if scen_dum_4
	*A1vsB2
	gen a1b2 = .
	replace a1b2=1 if scen_dum_1
	replace a1b2=0 if scen_dum_5
	*A1vsC
	gen a1c =.
	replace a1c=1 if scen_dum_1
	replace a1c=0 if scen_dum_6
	*A1vsD
	gen a1d=.
	replace a1d=1 if scen_dum_1
	replace a1d=0 if scen_dum_7

	*A2vsA3
	gen a2a3 =.
	replace a2a3=1 if scen_dum_2
	replace a2a3=0 if scen_dum_3
	*A2vsB1
	gen a2b1 =.
	replace a2b1=1 if scen_dum_2
	replace a2b1=0 if scen_dum_4
	*A2vsB2
	gen a2b2 = .
	replace a2b2=1 if scen_dum_2
	replace a2b2=0 if scen_dum_5
	*A2vsC
	gen a2c =.
	replace a2c=1 if scen_dum_2
	replace a2c=0 if scen_dum_6
	*A2vsD
	gen a2d=.
	replace a2d=1 if scen_dum_2
	replace a2d=0 if scen_dum_7

	*A3vsB1
	gen a3b1 =.
	replace a3b1=1 if scen_dum_3
	replace a3b1=0 if scen_dum_4
	*A3vsB2
	gen a3b2 = .
	replace a3b2=1 if scen_dum_3
	replace a3b2=0 if scen_dum_5
	*A3vsC
	gen a3c =.
	replace a3c=1 if scen_dum_3
	replace a3c=0 if scen_dum_6
	*A2vsD
	gen a3d=.
	replace a3d=1 if scen_dum_3
	replace a3d=0 if scen_dum_7

	*B1vsB2
	gen b1b2 = .
	replace b1b2=1 if scen_dum_4
	replace b1b2=0 if scen_dum_5
	*B1vsC
	gen b1c =.
	replace b1c=1 if scen_dum_4
	replace b1c=0 if scen_dum_6
	*B1vsD
	gen b1d=.
	replace b1d=1 if scen_dum_4
	replace b1d=0 if scen_dum_7

	*B2vsC
	gen b2c =.
	replace b2c=1 if scen_dum_5
	replace b2c=0 if scen_dum_6
	*B2vsD
	gen b2d=.
	replace b2d=1 if scen_dum_5
	replace b2d=0 if scen_dum_7

	*CvsD
	gen cd=.
	replace cd=1 if scen_dum_6
	replace cd=0 if scen_dum_7

	*DeceptionVSconfederates // decA=A1A2A3; conf=B1B2
	gen decA_v_conf=.
	replace decA_v_conf=1 if deception_A
	replace decA_v_conf=0 if confederates
	*DeceptionVSconfederates // decAC=A1A2A3C; conf=B1B2
	gen decAC_v_conf=.
	replace decAC_v_conf=1 if deception_AC
	replace decAC_v_conf=0 if confederates

	global one_to_one ("a1a2 a1b1 a1c a1d decAC_v_conf")

	*ttest comparing scenarios one to one
foreach s in PJ3_1 {
	 estpost ttest `s', by (a1a2) 
	 est sto m_a1a2
	 
	 estpost ttest `s', by (a1a3) 
	 est sto m_a1a3
	 
	 estpost ttest `s', by (a1b1) 
	 est sto m_a1b1
	 
	 estpost ttest `s', by (a1b2) 
	 est sto m_a1b2
	 
	 estpost ttest `s', by (a1c) 
	 est sto m_a1c
	 
	 estpost ttest `s', by (a1d) 
	 est sto m_a1d
	 
	 estpost ttest `s', by (a2a3) 
	 est sto m_a2a3
	 
	 estpost ttest `s', by (a2b1) 
	 est sto m_a2b1
	 
	 estpost ttest `s', by (a2b2) 
	 est sto m_a2b2
	 
	 estpost ttest `s', by (a2c) 
	 est sto m_a2c
	 
	 estpost ttest `s', by (a2d) 
	 est sto m_a2d
	 
	 estpost ttest `s', by (a3b1) 
	 est sto m_a3b1
	 
	 estpost ttest `s', by (a3b2) 
	 est sto m_a3b2
	 
	 estpost ttest `s', by (a3c) 
	 est sto m_a3c
	 
	 estpost ttest `s', by (a3d) 
	 est sto m_a3d
	 
	 estpost ttest `s', by (b1b2) 
	 est sto m_b1b2
	 
	 estpost ttest `s', by (b1c) 
	 est sto m_b1c
	 
	 estpost ttest `s', by (b1d) 
	 est sto m_b1d
	 
	 estpost ttest `s', by (b2c) 
	 est sto m_b2c
	 
	 estpost ttest `s', by (b2d) 
	 est sto m_b2d
	 
	 estpost ttest `s', by (cd) 
	 est sto m_cd
	 
	 estpost ttest `s', by (decAC_v_conf) 
	 est sto m_decAC_v_conf
	 
	 esttab m_a1a2 m_a1a3 m_a1b1 m_a1b2 m_a1c m_a1d ///
			m_a2a3 m_a2b1 m_a2b2 m_a2c m_a2d ///
			m_a3b1 m_a3b2 m_a3c m_a3d ///
			m_b1b2 m_b1c m_b1d ///
			m_b2c m_b2d ///
			m_cd ///
			m_decAC_v_conf using "$figures/app_L_TableL2.rtf",  replace onecell nonumber mtitle("diff.")
	 
	}	

*Appendix M: Regression on Acceptability of the Study (Probit Model)

probit PJ3_1_dmmy Gender Age age2 i.SocGrade white degree religious pol_int efficacy [pweight=w8], robust 
est sto Acceptability				
	 esttab Acceptability   ///
		using "$figures/app_M.rtf", replace se b(3) r2 star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack ///
		coef ( Gender "Female" /// 
		       Age "Age" /// 
		       white   "White" /// 
		       degree "Degree" /// 
			   pol_int "political interest" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
		       efficacy "Efficacy"  ) 	///
			   order (Gender Age SocGrade white degree religious pol_int efficacy) ///
			   modelwidth(10) varwidth(18) label nobaselevels 
		eststo clear

*Appendix N: Interaction Analysis of Approval of Deception

	*Table N1:  Views (PJ4_dmmy) of MPs participation w/ deception or confederates, probit models

global covar_views = "Gender Age age2 degree religious white deception_AC"

foreach y in  PJ4_dmmy { 

		* Model 1 - Religious
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##I.religious  [pweight=w8], robust
		est sto m1_`y'
		
		* Model 2 - Interest in politics 
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.pol_int_dmmy  [pweight=w8], robust
		est sto m2_`y'
		
		* Model 3 - Efficacy
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##c.efficacy  [pweight=w8], robust
		est sto m3_`y'
		
		* Model 4 - Social Grade
		quietly probit  `y' $covar_views i.deception_AC##i.SocGrade  [pweight=w8], robust
		est sto m4_`y'
		
		* Model 5 - Conservative vote
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.cons_vote_21  [pweight=w8], robust
		est sto m5_`y'
		
		* Model 6 - Degree
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.degree  [pweight=w8], robust
		est sto m6_`y'

		* Export results
				
		esttab m1_`y' m2_`y' m3_`y' m4_`y' m5_`y' m6_`y'   ///
		using "$figures/app_N_TableN1.rtf", replace se b(3) star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack ///
		coef ( PJ4_dmmy "Views" ///
			   Gender "Female" /// 
		       Age "Age" /// 
			   age2 "Age squared" ///
		       white   "White" /// 
		       degree "Degree" /// 
			   cons_vote_21 "Conservative vote" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
		       deception_AC "Scenarios with deception"  ) 	///
			   order (Gender Age age2 white degree religious deception_AC SocGrade) ///
			   modelwidth(10) varwidth(18) label nobaselevels 
		eststo clear 

		}
		
	*Table N2: Views of MPs Participation in Studies with Identity Deception or Use of Confederates, probit models (subset of respondents who passed 	manipulation checks) (see # of observations)

gen PJ4_dmmy_checks = PJ4_dmmy if check_all==1

foreach y in  PJ4_dmmy_checks { 

		* Model 1 - Religious
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##I.religious  [pweight=w8], robust
		est sto m1_`y'
		
		* Model 2 - Interest in politics 
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.pol_int_dmmy  [pweight=w8], robust
		est sto m2_`y'
		
		* Model 3 - Efficacy
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##c.efficacy  [pweight=w8], robust
		est sto m3_`y'
		
		* Model 4 - Social Grade
		quietly probit  `y' $covar_views i.deception_AC##i.SocGrade  [pweight=w8], robust
		est sto m4_`y'
		
		* Model 5 - Conservative vote
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.cons_vote_21  [pweight=w8], robust
		est sto m5_`y'
		
		* Model 6 - Degree
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.degree  [pweight=w8], robust
		est sto m6_`y'

		* Export results
				
		esttab m1_`y' m2_`y' m3_`y' m4_`y' m5_`y' m6_`y'   ///
		using "$figures/app_N_TableN2.rtf", replace se b(3) star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack ///
		coef ( PJ4_dmmy "Views" ///
			   Gender "Female" /// 
		       Age "Age" /// 
			   age2 "Age squared" ///
		       white   "White" /// 
		       degree "Degree" /// 
			   cons_vote_21 "Conservative vote" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
		       deception_AC "Scenarios with deception"  ) 	///
			   order (Gender Age age2 white degree religious deception_AC SocGrade) ///
			   modelwidth(10) varwidth(18) label nobaselevels 
		eststo clear 

		}

	*Table N3: Views of MPs Participation in Studies with Identity Deception or Use of Confederates, probit models (Model 7 with co-partisans added)
		
foreach y in  PJ4_dmmy { 

		* Model 1 - Religious
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##I.religious  [pweight=w8], robust
		est sto m1_`y'
		
		* Model 2 - Interest in politics 
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.pol_int_dmmy  [pweight=w8], robust
		est sto m2_`y'
		
		* Model 3 - Efficacy
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##c.efficacy  [pweight=w8], robust
		est sto m3_`y'
		
		* Model 4 - Social Grade
		quietly probit  `y' $covar_views i.deception_AC##i.SocGrade  [pweight=w8], robust
		est sto m4_`y'
		
		* Model 5 - Conservative vote
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.cons_vote_21  [pweight=w8], robust
		est sto m5_`y'
		
		* Model 6 - Degree
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.degree  [pweight=w8], robust
		est sto m6_`y'
		
		* Model 7 - Co-patisan
		quietly probit  `y' $covar_views i.SocGrade i.deception_AC##i.copartisan  [pweight=w8], robust
		est sto m7_`y'

		* Export results
				
		esttab m1_`y' m2_`y' m3_`y' m4_`y' m5_`y' m6_`y' m7_`y'  ///
		using "$figures/app_N_TableN3.rtf", replace se b(3) star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack ///
		coef ( PJ4_dmmy "Views" ///
			   Gender "Female" /// 
		       Age "Age" /// 
			   age2 "Age squared" ///
		       white   "White" /// 
		       degree "Degree" /// 
			   cons_vote_21 "Conservative vote" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
		       deception_AC "Scenarios with deception"  ) 	///
			   order (Gender Age age2 white degree religious deception_AC SocGrade) ///
			   modelwidth(10) varwidth(18) label nobaselevels 
		eststo clear 

		}		

*Appendix O: Exploring Disapproval of the Journalist Scenario

	*Table O1: Predicting Relative Support for Placing MPs in the Journalist Scenario, probit models

global covar_D = "Gender Age age2 degree religious white cons_vote_21" 

foreach y in  PJ3_1_dmmy { 

		* Model 1 - Gender
		quietly probit  `y' $covar_D i.SocGrade i.journalist##i.Gender, robust 
		est sto m1_`y'
		
		* Model 2 - Age
		quietly probit `y' $covar_D i.SocGrade i.journalist##c.Age, robust 
		est sto m2_`y'
		
		* Model 3 - Social grade
		quietly probit   `y' $covar_D i.journalist##i.SocGrade, robust 
		est sto m3_`y'
		
		* Model 4 - Conservative vote
		quietly probit   `y' $covar_D i.SocGrade i.journalist##i.cons_vote_21, robust 
		est sto m4_`y'
		
		* Model 5 - Efficacy
		quietly probit  `y' $covar_D i.SocGrade i.journalist##c.efficacy, robust 
		est sto m5_`y'
		
		* Model 6 - Political interest
		quietly probit   `y' $covar_D i.SocGrade i.journalist##i.pol_int_dmmy, robust 
		est sto m6_`y'
		
		* Model 7 - Degree
		quietly probit   `y' $covar_D i.SocGrade i.journalist##i.degree, robust 
		est sto m7_`y'

		* Export results
				
		esttab m1_`y' m2_`y' m3_`y' m4_`y' m5_`y' m6_`y' m7_`y'   ///
		using "$figures/app_O_TableO1.rtf", replace se drop(Gender Age age2 degree religious white cons_vote_21 SocGrade efficacy degree ) b(3) star(* 0.1 ** 0.05 *** 0.01) nocons eqlabels(none) unstack ///
		coef ( Gender "Female" /// 
		       Age "Age" /// 
		       white   "White" /// 
		       degree "Degree" /// 
			   cons_vote_21 "Conservative vote" ///
		       religious "Religious" /// 
			   SocGrade "Social grade" ///
		       journalist "Scenario D"  ) 	///
			   order ($covar_D SocGrade) ///
			   modelwidth(10) varwidth(18) label nobaselevels 
		eststo clear 

		}
